<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>blog-post</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
    <div id="app">
        <blog-post 
            v-for="post in posts"
            v-bind:key="post.id"
            v-bind:title="post.title"
        ></blog-post>
    </div>
    <script>
        Vue.component('blog-post', {
            props: ['title'],
            template: '<h3>{{ title }}</h3>'
        });
        var app = new Vue({
            el: '#app',
            data: {
                posts: [
                    { id: 1, title: '111'},
                    { id: 2, title: '222'},
                    { id: 3, title: '333'}
                ]
            }
        });
    </script>
</body>
</html>
